import request from '@/utils/request'

const MOVIE_URL = "/admin/system/sysMovie"
const AUTH_URL="/admin/system/upload"

export default {
    getPlayAuthById(id){
        return request({
            url:`${AUTH_URL}/getPlayAuth/${id}`,
            method:'get'
        })
    },

    //查询单个
    getMovieById(id){
        return request({
            url: `${MOVIE_URL}/findMovieById/${id}`,
            method: 'get',
        })
    },
    //添加
    addMovie(sysMovie){
        return request({
            url: `${MOVIE_URL}/addMovie`,
            method: 'post',
            data: sysMovie
        })
    },
    //修改
    updateMovie(sysMovie){
        return request({
            url: `${MOVIE_URL}/updateMovie`,
            method: 'post',
            data: sysMovie
        })
    },
    //删除
    removeMovieById(id){
        return request({
            url: `${MOVIE_URL}/removeMovie/${id}`,
            method: 'delete',
        })
    },
    // 列表以及分页 
    getMoviePageInfo(page, limit, searchObj) {
        return request({
            //  url: '/admin/system/role/'+page+"/"+limit,
            url: `${MOVIE_URL}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },

}